<html>
<head>
</head>
<body>
<?php
$temp = explode(".", $_FILES["file"]["name"]);
$extension = end($temp);

$a = $_FILES["file"];

foreach ($a as $k => $v) {
    echo "\$a[$k] => $v.\n";
}

echo "<br/>";
echo "<marquee>test write</marquee>";
echo "<script language=javascript>alert('hi');</script>";

echo $_FILES["file"]["tmp_name"];

  if ($_FILES["file"]["error"] > 0)
    {
    echo "Return Code: " . $_FILES["file"]["error"] . "<br>";
    }
  else
    {
    echo "Upload: " . $_FILES["file"]["name"] . "<br>";
    echo "Type: " . $_FILES["file"]["type"] . "<br>";
    echo "Size: " . ($_FILES["file"]["size"] / 1024) . " kB<br>";
    echo "Temp file: " . $_FILES["file"]["tmp_name"] . "<br>";

    if (file_exists("./upload/" . $_FILES["file"]["name"]))
      {
      echo $_FILES["file"]["name"] . " already exists. ";
      }
    else
      {
      if (move_uploaded_file($_FILES["file"]["tmp_name"], "./upload/" . $_FILES["file"]["name"])) {
        echo "Stored in: " . "./upload/" . $_FILES["file"]["name"];
      } else {
        echo "storing failed";
      } 
      }
    }
?>
</body>
</html>